<?php
	
class Table_Liaison extends Zend_Db_Table_Abstract
{
    protected $_name    = 'liaison';
    protected $_primary = array('VIP_VIP_NUMERO','VIP_NUMERO','DATE_EVENEMENT');
    protected $_sequence = FALSE;
 	
	
	public function insertLiaison($numVip, $numVipVip, $dateEvent, $motifFin){
                $data = array('VIP_NUMERO'=> $numVip, 'VIP_VIP_NUMERO' => $numVipVip,
                                        'DATE_EVENEMENT' => $dateEvent, 'LIAISON_MOTIFFIN' => $motifFin);
                $this->insert($data);
    }
	public function supprLiaison($id){
		$this->delete('VIP_NUMERO ='.(int)$id);
	}
	public function supprLiaison2($id){
		$this->delete('VIP_VIP_NUMERO ='.(int)$id);
	}
	

	public function getIdVipLiaison($id) {
		
			$req=$this->select()
			->setIntegrityCheck(false)
			->from($this, array("*"))
			->where('vip_numero = ?', $id)
			->orwhere('vip_vip_numero=?', $id);
			
			
			$resu=$this->fetchAll($req);
			
			return $resu;
	}
}